How to install:
Place the "scripts" folder in the GTA V installation directory; same folder where GTA5.exe is.

How to add your own cars:

Download Notepad++

Go into the PopupHeadlights/vehiclelist.cfg.
Here, you can add more vehicles and specify the door(s) you'd like to control.
The format is pretty self-explanatory:

mrx7 = BackLeftDoor,BackRightDoor | ReverseOpenClose:false

The text before the "=" sign is the spawn name. 
The text between the "=" and "|" signs are the names of the doors you want to control, separated by a comma (",").
The text after the "|" sign are for those certain vehicles that have the headlights open by default. Typically this is set to false.

The names of the doors are inside the vehiclelist.cfg as well, in the first line.

How to pop up the headlights:
Double tap the headlights button quickly (H on keyboard, Dpad Right on gamepad controllers).

How to turn on/off lights and highbeams:
Hold the headlights button for around 1 second (H on keyboard, Dpad Right on gamepad controllers).

How to adjust the headlight angle manually:
For gamepads, you can either push UP or DOWN on the left stick ("scoop" headlight vehicles only),
or hold Dpad Right and push UP or DOWN on the right stick (all other vehicles).
For keyboards, you can choose your own keys in the settings.ini. The default is O for up, and L for down.